<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <a href="http://www.gitee.com" @click="handleClick('禁止打开', $event)">打开链接 {{ @keyCodes.f1 }}</a>
    </div>
    <script src="https://unpkg.com/vue/dist/vue.js"></script>
    <script>
        Vue.config.keyCodes.f1 = 123;
        let app = new Vue({
            el: '#app',
            
            methods: {
                handleClick: function(message, event){
                    event.preventDefault();
                    window.alert(message)
                }
            }
        })
    </script>
</body>
</html>